package be.shoktan.tutorial.services;

import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

import org.apache.log4j.Logger;

import be.shoktan.tutorial.model.User;

public class PortfolioService {
	private static final Logger LOG = Logger.getLogger(PortfolioService.class);	
	private static final PortfolioService instance = new PortfolioService();
	
	private Map<String, User> db = new HashMap<String,User>();
	
	
	private PortfolioService(){
		if(LOG.isTraceEnabled())LOG.trace("creating the service instance");
	}
	
	public void createAccount(User user) {
		db.put(user.getUsername(), user);
	}

	public boolean userExists(String username) {
		return (db.containsKey(username));
	}

	public static PortfolioService getInstance() {
		return instance;
	}

	public void addImage(File pic) {
		
		// TODO Auto-generated method stub
		
	}
}